home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / misc / gms_dev.lha / GMSDev / Source / E / Misc / DPrintF.e next >
Encoding:
Text File  |  1998-10-02  |  1.2 KB  |  48 lines

  1. /*
  2.  * Games Master System - demo-source
  3.  *
  4.  * Name: DPrintF.e
  5.  * Type: Demonstrates how to use DPrintF() in E.
  6.  * Version: 1.0
  7.  * Author: G. W. Thomassen
  8.  * GMS version: 1.0
  9.  */
  10.  
  11. MODULE 'gms/dpkernel','gms/dpkernel/dpkernel',
  12.        'gms/system/debug'
  13.  
  14. ENUM NONE,ERR_LIB
  15.  
  16. PROC main() HANDLE
  17.   DEF str[65]:STRING
  18.  
  19.   IF (dpkbase:=OpenLibrary('GMS:Libs/dpkernel.library',1))=NIL THEN Raise(ERR_LIB)
  20.  
  21.   WriteF('Run IceBreaker to monitor the output..\n')
  22.  
  23.   -> Just make it easy to find it in the IceBreaker window
  24.   DprintF(' #####',['--dprintf---------------------------'])
  25.  
  26.   -> Output a string first
  27.   StrCopy(str,'It\as pretty easy when you know how!',ALL)
  28.   DprintF('##',['%s',str])
  29.  
  30.   -> Then try a string and a decimal
  31.   DprintF('##',['%s %d','The number is: ',12])
  32.  
  33.   -> You can put some text into the first array too..
  34.   DprintF('####',['%s or not!!','belive it'])
  35.  
  36.   -> You can put some text into the first array too and add a hex!
  37.   DprintF('##',['Hex number: $%x',$44])
  38.  
  39.   -> The End!
  40.   DprintF('##',['The End!'])
  41.  
  42.   DprintF('######## (gWt^98)',['---------------------------dprintf--'])
  43.   Raise(NONE)   -> No error...
  44. EXCEPT DO
  45.   CloseDPK()
  46.   IF exception=ERR_LIB THEN WriteF('Error: Couldn\at open dpkernel.library\n')
  47. ENDPROC
  48.